// $codepro.audit.disable packageJavadoc, numericLiterals
package definition;

import iface.DiceInformation;

/**
 * Definitions of the different dice types.
 * 
 * @author Joana Otetelisanu
 * @author Marcus Lindner
 * 
 * @version $Revision$
 */
public enum Dice implements DiceInformation {
    /** Die with two sides.*/
    TWO_SIDED_DIE(4, "d2"),
    /** Die with two sides.*/
    THREE_SIDED_DIE(3,"d3"),
    /** Die with four sides.*/
    FOUR_SIDED_DIE(4,"d4"),
    /** Die with six sides.*/
    SIX_SIDED_DIE(6,"d6"),
    /** Die with seven sides.*/
    SEVEN_SIDED_DIE(7,"d7"),
    /** Die with eight sides.*/
    EIGHT_SIDED_DIE(8,"d8"),
    /** Die with ten sides.*/
    TEN_SIDED_DIE(10,"d10"),
    /** Die with twelve sides.*/
    TWELVE_SIDED_DIE(12,"d12"),
    /** Die with twenty sides.*/
    TWENTY_SIDED_DIE(20,"d20"),
    /** Die with thirty sides.*/
    THIRTY_SIDED_DIE(30,"d30"),
    /** Die with one hundred sides.*/
    HUNDRET_SIDED_DIE(100,"d100");

    private final int sides;
    private final String name;
    
    private Dice(int diceSides, String diceName) {
	this.sides = diceSides;
	this.name = diceName;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int getNumberOfSides() {
	return this.sides;
    }
    /**
     * {@inheritDoc}
     */
    @Override
    public String toString(){
	return this.name; 
    }
}
